#include <stdio.h>
#include <stdlib.h>

int main()
{
	int seed = 0;
	int n = 0;
	double x = 0;
	double y = 0;
	int m = 0;
	int i = 0;
	scanf("%d %d", &seed, &n);
	srand((unsigned int)seed);
	
	for (i=0; i<n; i++)
	{
		x = (double)rand() / RAND_MAX + 1;
		
		y = (double)rand() / RAND_MAX;
	
		if (y <= 1.0 / x)
		{
			m++;
		}
		
	}
	
	printf("%f", (double)m / n);
	
	return 0;
}

